<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<script type="text/javascript">
<!--
$(document).ready(
		function(){
			//发送状态
			typeSelectOption("COMM_STATUS","filter_EQL_sendSatus_id","name","id","${param['filter_EQL_sendSatus_id']}");
		}
				);
//-->
</script>
<form id="pagerForm" method="post" action="${ctx }/crm/sms.action">
	<input type="hidden" name="status" value="${param.status}">
	<input type="hidden" name="keywords" value="${param.keywords}" />
	<input type="hidden" name="pageNum"  value="${page.pageNo}" />
	<input type="hidden" name="numPerPage" id="numPerPage" value="${page.pageSize}" />
	<input type="hidden" name="orderField" value="${param.orderField}" />
	<input type="hidden" name="selectedId" id="selectedId" value="" />
	
	<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
	<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
	<input type="hidden" name="page.order" id="order" value="${page.order}"/>
	<input type="hidden" name="page.pageSize" id="pageSize" value="${page.pageSize}"/>
</form>

<div class="page">
	<div class="pageHeader">
		<form onsubmit="return navTabSearch(this);" action="${ctx }/crm/sms.action" method="post">
		<div class="searchBar">
			<ul class="searchContent">			
				<li>
					<label>姓名：</label>
					<input type="text" name="filter_LIKES_name" value="${param['filter_LIKES_name']}"/>
				</li>
				<li>
					<label>手机：</label>
					<input type="text" name="filter_LIKES_target" value="${param['filter_LIKES_target']}"/>
				</li>
					<li>
					<label>发送状态：</label>
					<select id="filter_EQL_sendSatus_id" name="filter_EQL_sendSatus_id">
					</select>
				</li>
			</ul>
			<div class="subBar">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit"> 检 索 </button></div></div></li>
				</ul>
			</div>
		</div>
		</form>
	</div>
	<div class="pageContent">
		<div class="panelBar">
			<ul class="toolBar">			
			<!-- 
				<li><a class="add" href="${ctx }/crm/sms!input.action" target="navTab"><span>查看短信</span></a></li>
				 -->
				<li><a  class="delete" target="navTabTodo" href="${ctx}/crm/sms!delete.action?id={smsId}" title="确定要删除吗?"><span>删除</span></a></li>
				
				<li><a  class="edit" href="${ctx}/crm/sms!input.action?id={smsId}"  target="navTab" ><span>查看短信</span></a></li>
				
				<li class="line">line</li>
			</ul>
		</div>
		<table class="table" layouth="142">
			<thead>
				<tr>				
				<th>姓名</th>
				<th>接收手机</th>
				<th>发送时间</th>
				<th>发送状态</th>				
				<th>发送人</th>
				<th>短信类型</th>
				<th>计划发送时间</th>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="page.result">
					<tr target="smsId" rel="${id}">
						<td>${name }</td>
						<td>${target }</td>						
						<td><s:date name="sendtime" format="yyyy-MM-dd HH:mm"/></td>
						<td>${sendSatus.name}</td>						
						<td>${task.username}</td>
						<td>${task.type.name}</td>
						<td><s:date name="plantime" format="yyyy-MM-dd HH:mm"/></td>
					</tr>
		</s:iterator>	
			</tbody>
		</table>
		<div class="panelBar">
			<div class="pages">
				<span>显示</span>
				<select name="numPerPage" id="showNumPerPage" onchange="$('#pageSize').val($(this).val());navTabPageBreak({numPerPage:this.value})">
					<option value="14">14</option>
					<option value="20">20</option>
					<option value="50">50</option>
					<option value="100">100</option>
				</select>
				<span>条，共${page.totalCount}条</span>
			</div>
			
			<div class="pagination" targetType="navTab" totalCount="${page.totalCount}" numPerPage="${page.pageSize}" pageNumShown="10" currentPage="${page.pageNo}"></div>

		</div>
	</div>
</div>